home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / src / mosmlyac / skeleton.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-18  |  729 b   |  43 lines  |  [TEXT/R*ch]

  1. #include "defs.h"
  2.  
  3. char *header[] =
  4. {
  5.   "open Obj Parsing;",
  6.   "prim_val vector_ : int -> 'a -> 'a Vector.vector         = 2 \"make_vect\";",
  7.   "prim_val update_ : 'a Vector.vector -> int -> 'a -> unit = 3 \"set_vect_item\";",
  8.   "",
  9.   0
  10. };
  11.  
  12. char *define_tables[] =
  13. {
  14.   "val yytables : parseTables =",
  15.   "  ( yyact,",
  16.   "    yytransl,",
  17.   "    yylhs,",
  18.   "    yylen,",
  19.   "    yydefred,",
  20.   "    yydgoto,",
  21.   "    yysindex,",
  22.   "    yyrindex,",
  23.   "    yygindex,",
  24.   "    YYTABLESIZE,",
  25.   "    yytable,",
  26.   "    yycheck );",
  27.   0
  28. };
  29.  
  30. write_section(section)
  31. char *section[];
  32. {
  33.     register int i;
  34.     register FILE *fp;
  35.  
  36.     fp = code_file;
  37.     for (i = 0; section[i]; ++i)
  38.     {
  39.     ++outline;
  40.     fprintf(fp, "%s\n", section[i]);
  41.     }
  42. }
  43.